package com.wngbms.websocket.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class UserMetaInfo {

    String userId;
    String serviceId;
    String ip;
    short port;

    public String getAddress() {
        return "http://" + ip + ":" + port;
    }

    @Override
    public String toString() {
        return "UserMetaInfo{" +
                "userId='" + userId + '\'' +
                ", serviceId='" + serviceId + '\'' +
                ", ip='" + ip + '\'' +
                ", port=" + port +
                '}';
    }
}
